//
//  NSString+ZCHelp.h
//  UniversalApp
//
//  Created by 凯朱 on 2019/6/1.
//  Copyright © 2019 徐阳. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (ZCHelp)
/**
 日期转成日期字符串 代替方法 +(NSString *)dateStringFromDate:(NSDate *)date formatStr:(NSString *)fomatterStr
 
 @param date 日期
 @param formatStr 格式
 @return 日期字符串
 */
+(NSString *)convertDateString:(NSString *)dateString;
+(NSString *)dateStrFromDate:(NSDate *)date formatStr:(NSString *)formatStr;
-(UIViewController *)nibVCFromMainBundle;
+(NSString *)timeStringFromTimestamp:(NSString *)timestamp formart:(NSString *)formart;
/**
 计算富文本高度
 
 @param width 宽度
 @param font 字体大小
 @param lineSpace 行距
 @return 文本高度
 */
-(CGFloat)countHeightWithWidth:(CGFloat)width font:(UIFont *)font lineSpace:(CGFloat)lineSpace;

/**
 任何对象转字符串 代替以下方法
 
 @param obj 对象
 @return 字符串
 */
+(NSString *)valueToString:(id)obj;

//html字符串转富文本
-(NSAttributedString *)htmlToAttributeWith:(NSDictionary *)options;

/*
 任何对象转字符串并且为空的时候用replaceStr代替
 */
+(NSString *)replaceWithString:(id)obj replaceStr:(NSString *)replaceStr;

/**
 电话号码校验
 */
-(BOOL)isTelNumber;

/**
 是6位数字
 */
-(BOOL)isSixNumber;

-(UIViewController *)nibVCFromBundle;

+(NSString *)stringNoUTCDateByFormatString:(NSString *)formatString date:(NSDate *)date;

//将yyyy-MM-dd HH:mm:ss格式字符串转成指定格式字符串
+(NSString *)convertDateString:(NSString *)dateString outFormart:(NSString *)outFormart;

-(BOOL)checkPassword;
- (BOOL)isValidEmail;
-(NSString *)urlEncode;
- (NSString *)stringToHex;

+(NSString *)connectUrl:(NSDictionary *)params url:(NSString *)urlLink;
+(NSString *)getUniqueDeviceIdentifierAsString;

@end

NS_ASSUME_NONNULL_END
